<?php
 $sideItems =//el sideBar deepende del controllador
         array(
             array(  
                    'label' => 'Buscar',
                    'link' => base_url().'cliente/buscarCliente',
                    'icon'=>'search',
                    'active'=>($this->uri->segment(2)=="buscarCliente")),

                array(  
                    'label' => 'Nuevo',
                    'link' => base_url().'cliente/registrarCliente',
                    'icon'=>'pencil',
                    'active'=> ($this->uri->segment(2)=="registrarCliente")),
            );
    
?>

<div class="well sidebar-nav">
    <ul class="nav nav-list">
        <li class="nav-header"><h4>Clientes</h4></li>        
        <?php
            foreach ($sideItems as $sideItem){
                $activeStr = "";
                if ($sideItem['active']) $activeStr ="class='active'";
                echo "<li ".$activeStr.">
                        <a href='".$sideItem['link']."'>".
                            '<i class="icon-'.$sideItem['icon'].'"></i>'.$sideItem['label'].
                        "</a></li>";
            }
        ?>
    </ul>
</div>
